package org.irri.smta.repository;

import java.util.List;

import javax.inject.Named;

import org.irri.smta.domain.AccessPrivilege;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

@Named("accessPrivilegeRepository")
public interface IAccessPrivilegeRepository extends JpaRepository<AccessPrivilege, Long> {
	
	@Transactional(readOnly = true)
	@Query("SELECT o FROM AccessPrivilege o ORDER BY o.action ASC")
	List<AccessPrivilege> findAllOrdered();

}
